Teaching Concurrent Software Design: A Case Study Using Android

نویسندگان

  • Konstantin Läufer
  • George K. Thiruvathukal
چکیده

In this article, we explore various parallel and distributed computing topics from a usercentric software engineering perspective. Specifically, in the context of mobile application development, we study the basic building blocks of interactive applications in the form of events, timers, and asynchronous activities, along with related software modeling, architecture, and design topics. Relevant software engineering topics: software requirements: functional requirements (C), nonfunctional requirements (C) software design: user interface patterns (A), concurrency patterns (A), testing patterns (A), architectural patterns (C), dependency injection (C), design complexity (C); software testing: unit testing (A), managing dependencies in testing (A); cross-cutting topics: web services (C), pervasive and mobile computing (A) Relevant parallel and distributed computing topics: Algorithmic problems: asynchrony (C); architecture classes: simultaneous multithreading (K), SMP (K); parallel programming paradigms and notations: task/thread spawning (A); semantics and correctness issues: tasks and threads (C), synchronization (A); concurrency defects: deadlocks (C), thread safety/race conditions (A); cross-cutting topics: why and what is parallel/distributed computing (C), concurrency (A), nondeterminism (C) Learning outcomes: The student will be able to model and design mobile applications involving events, timers, and asynchronous activities. The student will be able to implement these types of applications on the Android platform. The student will develop an understanding of nonfunctional requirements. Context for use: A semester-long intermediate to advanced undergraduate course on objectoriented development. Assumes prerequisite CS2 and background in an object-oriented language such as Java, C++, or C#. 1 Background and Motivation In this article, we will explore various parallel and distributed computing topics from a user-centric software engineering perspective. Specifically, in the context of mobile application development, we 1 ar X iv :1 70 5. 02 89 9v 1 [ cs .S E ] 8 M ay 2 01 7 will study the basic building blocks of interactive applications in the form of events, timers, and asynchronous activities, along with related software modeling, architecture, and design topics. Based on the authors’ ongoing research and teaching in this area, this material is suitable for a five-week module on concurrency topics within a semester-long intermediate to advanced undergraduate course on object-oriented development. It is possible to extend coverage by going into more depth on the online examples [LTY16a] and studying techniques for offloading tasks to the cloud [LTY16c]. The article is intended to be useful to instructors and students alike. Given the central importance of the human-computer interface for enabling humans to use computers effectively, this area has received considerable attention since around 1960 [Mye98]. Graphical user interfaces (GUIs) emerged in the early 1970s and have become a prominent technical domain addressed by numerous widget toolkits (application frameworks for GUI development). Common to most of these is the need to balance ease of programming, correctness, performance, and consistency of look-and-feel. Concurrency always plays at least an implicit role and usually becomes an explicit programmer concern when the application involves processor-bound, potentially long-running activities controlled by the GUI. Here, long-running means anything longer than the user wants to wait for before being able to continue interacting with the application. This article is about the concepts and techniques required to achieve this balance between correctness and performance in the context of GUI development. During the last few years, mobile devices such as smartphones and tablets have displaced the desktop PC as the predominant front-end interface to information and computing resources. In terms of global internet consumption (minutes per day), mobile devices overtook desktop computers in mid-2014 [Bra16], and “more websites are now loaded on smartphones and tablets than on desktop computers” [Gua16] as of October 2016. Google also announced [Blo15] that it will be displaying mobile-friendly web sites higher in the search results, which speaks to the new world order. These mobile devices participate in a massive global distributed system where mobile applications offload substantial resource needs (computation and storage) to the cloud. In response to this important trend, this article focuses on concurrency in the context of mobile application development, especially Android, which shares many aspects with previous-generation (and desktop-centric) GUI application frameworks such as Java AWT and Swing yet. (And it almost goes without saying that students are more excited about learning programming principles via technologies like Android and iOS, which they are using more often than their desktop computers.) While the focus of this article is largely on concurrency within the mobile device itself, the online source code for one of our examples [LTY16c] goes beyond the on-device experience by providing versions that connect to RESTful web services (optionally hosted in the cloud) [Chr09]. We’ve deliberately focused this article around the on-device experience, consistent with “mobile first” thinking, which more generally is the way the “internet of things” also works [Ash09]. This thinking results in proper separation of concerns when it comes to the user experience, local computation, and remote interactions (mediated using web services). It is worth taking a few moments to ponder why mobile platforms are interesting from the standpoint of parallel and distributed computing, even if at first glance it is obvious. From an architectural point of view, the landscape of mobile devices has followed a similar trajectory to that of traditional multiprocessing systems. The early mobile device offerings, especially when it came to smartphones, were single core. At the time of writing, the typical smartphone or tablet is equipped with four CPU cores and a graphics processing unit (GPU), with the trend of increasing cores (to at least 8) expected to continue in mobile CPUs. In this vein, today’s–and tomorrow’s–

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Android Application for Estimating Muscle Onset Latency using Surface EMG Signal

Background: Electromyography (EMG) signal processing and Muscle Onset Latency (MOL) are widely used in rehabilitation sciences and nerve conduction studies. The majority of existing software packages provided for estimating MOL via analyzing EMG signal are computerized, desktop based and not portable; therefore, experiments and signal analyzes using them should be completed locally. Moreover, a...

متن کامل

The Reliability and Concurrent Validity of Digital Inclinometer, Smartphone Applications, and the Cervical Range of Motion Device for Measuring the Cervical Range of Motion

Objectives: Changes in the Range of Motion (ROM) are essential criteria in determining the severity of spinal disorders and could be effective in predicting pain progression. Instruments to measure the ROM are costly and unavailable in most therapy settings. While there is a tendency in therapists to use their smartphones instead, there is no report to measure the suitability of smartphones to ...

متن کامل

CARduino: A Semi-automated Vehicle Prototype to Stimulate Cognitive Development in a Learning-Teaching Methodology

This paper aims to present the development of an semi-automated vehicle prototype using Arduino and sensors that will be controlled by software developed for Android that can simulate the execution of manual and semi-automatic paths according to the user’s needs. It will be presented both the physical and the logical development of the proposed vehicle and will be presented a set of experiments...

متن کامل

Assessing Pbl with Software Factory and Agile Processes: a Case Study to Develop Mobile Software ́s Engineers

The increasing and continuous presence of software products and services consumed daily by the society is gaining momentum with the development of the mobile device market. In this scenario, the demand for trained professionals in specific technologies for mobile platforms like Google Android and Samsung BADA, is growing rapidly. The Problem Based Learning method was used to solve practical and...

متن کامل

Concurrent Design of Embedded Control Software

Embedded software design for mechatronic systems is becoming an increasingly time-consuming and error-prone task. In order to cope with the heterogeneity and complexity, a systematic model-driven design approach is needed, where several parts of the system can be designed concurrently. There is however a trade-off between concurrency efficiency and integration efficiency. In this paper, we pres...

متن کامل

Modeling Android applications using UML

The applications development for Android platform differs from traditional software development. These applications are usually complex, due to the characteristics imposed by the platform, thereby increasing the design complexity. Moreover, the designer has to worry about a reduced time to market. This way, approaches to accelerate the development and deal with complex systems are required. UML...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1705.02899  شماره 

صفحات  -

تاریخ انتشار 2017